import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {ValidateProvider} from "../../providers/validate/validate";

@IonicPage({
    defaultHistory: ['TaskPage']
})
@Component({
    selector: 'page-task-search',
    templateUrl: 'task-search.html',
})
export class TaskSearchPage {

    constructor(
        public navCtrl: NavController,
        public navParams: NavParams,
        public validate: ValidateProvider
    ) {
        if (!this.validate.checkLogin()) {
            this.navCtrl.push('LoginPage');
        }
    }
    ionViewCanEnter(){
        return this.validate.checkLogin();
    }
}
